CXXFLAGS =	-O2 -g -Wall -fmessage-length=0

DIR_SRC = ./src
DIR_OBJ = obj
LIBS =

TARGET =	../out/libhxglib.a

SRC = $(wildcard ${DIR_SRC}/*.cpp)  
OBJS = $(patsubst %.cpp,${DIR_OBJ}/%.o,$(notdir ${SRC})) 

$(TARGET):	$(OBJS)
	ar rvs $(TARGET) $(OBJS) $(LIBS)
	
${DIR_OBJ}/%.o:${DIR_SRC}/%.cpp
	$(CXX) $(CXXFLAGS) -c  $< -o $@

all:	$(TARGET)

.PHONY:clean
clean:
	rm -f $(OBJS) $(TARGET)

aa:
	@echo $(OBJS)
